{include file=member.header.html}
<style type="text/css">
.float_right {float: right;}
.refund_form{margin:15px;}
.refund_form table tr{width:100%;height:40px;}
.refund_info{border-top:1px #ddd solid;marign-top:20px; line-height:23px;padding:20px;}
.refund_form input{ vertical-align:middle}
.refund_submit{ display:inline-block; background:url('{res file=images/refund_btn.jpg}') no-repeat -102px 0; width:83px; height:30px; line-height:30px; text-align:center;color:#fff; text-decoration:none;font-weight:bold;border:0; cursor:pointer}
</style>
<script>
$(function(){
	$("#refund_add").submit(function(){
		if($('#content').val()==''){
			alert(lang.reason_cannot_be_empty);
			return false;
		}
		if($('input[name="refund_cert"]').val()==''){
			alert(lang.please_upload_documents);
			return false;
		}
	});
});
</script>

<div class="content">
    {include file=member.menu.html}
    <div id="right">
        {include file=member.curlocal.html}
        {include file=member.submenu.html}
        <div class="wrap">
            <div class="public refund_form">
            	<form id="refund_add" method="post" enctype="multipart/form-data">
                	<input type="hidden" name="refund_id" value="{$refund.refund_id}" />
                	<table>
                        <tr>
                        	<td>{$lang.refund_reason}：</td>
                            <td>
                              <textarea name="content" id="content" class="text" style="width:500px; height:40px"></textarea>
                            </td>
                        </tr>
                        <tr>
                        	<td>{$lang.upload_document}：</td><td><input type="file" name="refund_cert" /></td>
                        </tr>
                         <tr>
                        	<td></td><td><input type="submit" value="{$lang.submit}" class="refund_submit" /></td>
                        </tr>
                    </table>
                </form>
            </div>
            <ul class="refund_info">
                <li>{$lang.refund_number}：{$refund.refund_sn}</li>
                <li>{$lang.apply_date}：{$refund.created|date:Y-m-d H:i:s}</li>
                <li>
                    	{$lang.refund_status}：
                        {if $refund.status=='CLOSED'}
                        {$lang.refund_colse}
                        {elseif $refund.status=='SUCCESS'}
                        {$lang.refund_succed}
                        {elseif $refund.status=='FAILED'}
                        {$lang.refund_fail}
                        {elseif $refund.status=='WAIT_SELLER_AGREE'}
                        {$lang.buyer_apply_refund}
                        {elseif $refund.status=='SELLER_REFUSE_BUYER'}
                        {$lang.seller_refused_refund}
                        {elseif $refund.status=='WAIT_SELLER_CONFIRM'}
                        {$lang.refund_apply_wait}
                        {/if}	
                 </li>
                 <li>{$lang.deal_amount}：{$refund.total_fee|price}</li>
                 <li>{$lang.refund_money}：{$refund.refund_fee|price}</li>
                 <li>{$lang.refund_reason}：{$refund.refund_reason|escape}</li>
                 <li>{$lang.refund_instruction}：{$refund.refund_desc|escape}</li>
             </ul>
        </div>
        <div class="clear"></div>
    </div>
    <div class="clear"></div>
</div>
{include file=footer.html}
